package com.neusoft.bizcore.file.model;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Document
public class FileDocument {
    @Id // 主键
    private String id;
    private String name; // 文件名称
    private long size; // 文件大小
    private Date uploadDate; // 上传时间
    private String md5; // 文件MD5值
    private String contentType; // 文件类型
    private String suffix; // 文件后缀名
    private String description; // 文件描述
    private String fsId; // 大文件管理GridFS的ID

    @Override
    public String toString() {
        return "FileDocument{" +
                "id='" + this.id + '\'' +
                ", name='" + this.name + '\'' +
                ", size=" + this.size +
                ", uploadDate=" + this.uploadDate +
                ", md5='" + this.md5 + '\'' +
                ", contentType='" + this.contentType + '\'' +
                ", suffix='" + this.suffix + '\'' +
                ", description='" + this.description + '\'' +
                ", gridfsId='" + this.fsId + '\'' +
                '}';
    }
}
